{% block sw_sales_channel_detail_analytics %}
<mt-card
    position-identifier="sw-sales-channel-detail-analytics"
    :title="$tc('sw-sales-channel.detail.analytics.cardTitle')"
    :is-loading="isLoading"
>
    <template v-if="salesChannel && salesChannel.analytics">
        {% block sw_sales_channel_detail_analytics_headline %}
        <div class="sw-sales-channel-detail-analytics__headline-text">
            {{ $tc('sw-sales-channel.detail.analytics.headline') }}
        </div>
        {% endblock %}

        {% block sw_sales_channel_detail_analytics_description %}
        <p
            class="sw-sales-channel-detail-analytics__description"
            v-html="$tc('sw-sales-channel.detail.analytics.description')"
        ></p>
        {% endblock %}

        {% block sw_sales_channel_detail_analytics_fields_tracking_id %}

        <mt-text-field
            v-model="salesChannel.analytics.trackingId"
            :label="$tc('sw-sales-channel.detail.analytics.fields.trackingId.label')"
            :placeholder="$tc('sw-sales-channel.detail.analytics.fields.trackingId.placeHolder')"
            name="trackingId"
            :disabled="!acl.can('sales_channel.editor')"
            :help-text="$tc('sw-sales-channel.detail.analytics.fields.trackingId.helpText')"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_analytics_fields_container %}
        <sw-container
            columns="repeat(auto-fit, minmax(250px, 1fr))"
            gap="0 30px"
        >
            {% block sw_sales_channel_detail_analytics_fields_active %}

            <mt-switch
                v-model="salesChannel.analytics.active"
                :label="$tc('sw-sales-channel.detail.analytics.fields.active.label')"
                name="analyticsActive"
                :disabled="!acl.can('sales_channel.editor')"
            />
            {% endblock %}

            {% block sw_sales_channel_detail_analytics_fields_track_orders %}

            <mt-switch
                v-model="salesChannel.analytics.trackOrders"
                :label="$tc('sw-sales-channel.detail.analytics.fields.trackOrders.label')"
                name="trackOrders"
                :disabled="!acl.can('sales_channel.editor')"
            />
            {% endblock %}

            {% block sw_sales_channel_detail_analytics_fields_anonymize_ip %}

            <mt-switch
                v-model="salesChannel.analytics.anonymizeIp"
                :label="$tc('sw-sales-channel.detail.analytics.fields.anonymizeIp.label')"
                name="anonymizeIp"
                :disabled="!acl.can('sales_channel.editor')"
            />
            {% endblock %}
        </sw-container>
        {% endblock %}
    </template>
</mt-card>
{% endblock %}
